package com.yuanduan.mplus.view;

import android.content.res.Resources;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.yuanduan.mplus.R;

/**
 * Created by cj on 2016/6/16.
 * Email:781806481@qq.com
 * 废弃
 */
public class ReportFragment_2 extends Fragment {
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=LayoutInflater.from(getActivity()).inflate(R.layout.fragment_report2,null);
        TextView tv= (TextView) view.findViewById(R.id.report_introduce);
        tv.setText(getContent(((ReportActivity)getActivity()).Type));
        return view;
    }
    private String getContent(String reportType){
        String result=null;
        Resources resources=getActivity().getResources();
        switch (reportType){
            case "LDW":
                result=resources.getString(R.string.LDW);
                break;
            case "HMW":
                result=resources.getString(R.string.HMW);
                break;
            case "SLI":
                result=resources.getString(R.string.SLI);
                break;
            case "FCW":
                result=resources.getString(R.string.FCW);
                break;
            case "UFCW":
                result=resources.getString(R.string.UFCW);
                break;
            case "PCW":
                result=resources.getString(R.string.PCW);
                break;
            case "ACC":
                result=resources.getString(R.string.ACC);
                break;
            case "BRAKE":
                result=resources.getString(R.string.BRAKE);
                break;
            case "FLC":
                result=resources.getString(R.string.FLC);
                break;
            case "TB":
                result=resources.getString(R.string.TB);
                break;
            case "TA":
                result=resources.getString(R.string.TA);
                break;
        }
        return result;
    }
}
